package Utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

public class LoadHtmlFile {
    private static File file;
    public static String load(String filePath) throws Exception {
        System.out.println(filePath);
        file = new File(LoadHtmlFile.class.getResource("/static"+filePath).getFile());
        BufferedReader reader = new BufferedReader(new FileReader(file));
        StringBuilder str = new StringBuilder();
        String buffer;
        while ((buffer = reader.readLine()) != null){
            str.append(buffer+"\r\n");
        }
        return str.toString();
    }
}
